﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Networking;
namespace MrPP.SerriedCabinet {
    /*
    class ModelServer: NetworkBehaviour
    {

        [Command]
        public void CmdAreaColumnConfiguration(AreaColumnConfigurationFactory.Data data)
        {

            Model.Instance.refreshAreaColumnConfiguration(data);

        }

        [Command]
        public void CmdInitialStatus(InitialStatusFactory.Data data)
        {


            Model.Instance.refreshInitialStatus(data);
        }
        [Command]   
        public void CmdActiveColumnPositions(ActiveColumnPositionsFactory.Data data)
        {

            Model.Instance.refreshActiveColumnPositions(data);

        }
        [Command]
        public void CmdActiveColumnStatus(ActiveColumnStatusFactory.Data data)
        {

            Model.Instance.refreshActiveColumnStatus(data);
        }



    
        public void Start()
        {  
            AreaColumnConfigurationFactory.Instance.onRecevie += CmdAreaColumnConfiguration;
            InitialStatusFactory.Instance.onRecevie += CmdInitialStatus;
            ActiveColumnPositionsFactory.Instance.onRecevie += CmdActiveColumnPositions;
            ActiveColumnStatusFactory.Instance.onRecevie += CmdActiveColumnStatus;
        }
        
        void OnDestroy()
        {

            if (AreaColumnConfigurationFactory.IsInitialized)
            {
                AreaColumnConfigurationFactory.Instance.onRecevie -= CmdAreaColumnConfiguration;
            }
            if (InitialStatusFactory.IsInitialized)
            {
                InitialStatusFactory.Instance.onRecevie -= CmdInitialStatus;
            }
            if (ActiveColumnPositionsFactory.IsInitialized)
            {
                ActiveColumnPositionsFactory.Instance.onRecevie -= CmdActiveColumnPositions;
            }
            if (ActiveColumnStatusFactory.IsInitialized)
            {
                ActiveColumnStatusFactory.Instance.onRecevie -= CmdActiveColumnStatus;
            }
        }
    }*/
}